package com.springboot.springautowired.circularReference.complex;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.config.ConfigurableBeanFactory;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Service;

/**
 * 多例bean的循环依赖项目启动不会报错
 * @author mac
 * @date 2021/9/15 10:40 上午
 */
//@Scope(ConfigurableBeanFactory.SCOPE_PROTOTYPE)  添加了这个注解之后复杂的多例循环依赖问题项目启动就会出问题，不加的时候不会出问题
@Service
public class TestServiceOne {
    @Autowired
    private TestServiceTwo testServiceTwo;
    @Autowired
    private TestServiceThree testServiceThree;

    public void testOne(){

    }
}
